﻿
@{
    ViewBag.Title = "表单验证";
    Layout = "/Areas/Adm/Views/Shared/_Layout_Body.cshtml";
}
@section StylesBefore
{
    @Styles.Render("~/Template/Admin/jucheap/Css/FormValidate")
}

@section Scripts
{
    @Scripts.Render("~/JS/Admin/jucheap/FormValidate")
    <script>
        $(document).ready(function(){
            $('.iCheck').iCheck({
                checkboxClass: 'icheckbox_minimal',
                radioClass: 'iradio_minimal',
                increaseArea: '20%' // optional
            });
            $('.iCheck-square').iCheck({
                checkboxClass: 'icheckbox_square',
                radioClass: 'iradio_square',
                increaseArea: '20%' // optional
            });
            $('.iCheck-flat').iCheck({
                checkboxClass: 'icheckbox_flat',
                radioClass: 'iradio_flat',
                increaseArea: '20%' // optional
            });
            $('.iCheck-polaris').iCheck({
                checkboxClass: 'icheckbox_polaris',
                radioClass: 'iradio_polaris',
                increaseArea: '20%' // optional
            });
        });
</script>

}

<!--body wrapper start-->
<div class="wrapper">

    <div class="row">
        <div class="col-lg-12">
            <section class="panel">
                <header class="panel-heading">
                    Form validations
                </header>
                <div class="panel-body">
                    <div class=" form">
                        <form class="cmxform form-horizontal tasi-form" id="commentForm" method="get" action="@Url.Action("FormValidate")">
                            <div class="form-group ">
                                <label for="cname" class="control-label col-lg-2">Name (required)</label>
                                <div class="col-lg-10">
                                    <input class=" form-control" id="cname" name="name" minlength="2" type="text" required />
                                </div>
                            </div>
                            <div class="form-group ">
                                <label for="cemail" class="control-label col-lg-2">E-Mail (required)</label>
                                <div class="col-lg-10">
                                    <input class="form-control " id="cemail" type="email" name="email" required />
                                </div>
                            </div>
                            <div class="form-group ">
                                <label for="curl" class="control-label col-lg-2">URL (optional)</label>
                                <div class="col-lg-10">
                                    <input class="form-control " id="curl" type="url" name="url" />
                                </div>
                            </div>
                            <div class="form-group ">
                                <label for="ccomment" class="control-label col-lg-2">Your Comment (required)</label>
                                <div class="col-lg-10">
                                    <textarea class="form-control " id="ccomment" name="comment" required></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-lg-offset-2 col-lg-10">
                                    <button class="btn btn-success" type="submit">Save</button>
                                    <button class="btn btn-default" type="button">Cancel</button>
                                </div>
                            </div>
                        </form>
                    </div>

                </div>
            </section>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <section class="panel">
                <header class="panel-heading">
                    Advanced Form validations
                </header>
                <div class="panel-body">
                    <div class="form">
                        <form class="cmxform form-horizontal tasi-form" id="signupForm" method="get" action="@Url.Action("FormValidate")">
                            <div class="form-group ">
                                <label for="firstname" class="control-label col-lg-2">Firstname *</label>
                                <div class="col-lg-10">
                                    <input class=" form-control" id="firstname" name="firstname" type="text" />
                                </div>
                            </div>
                            <div class="form-group ">
                                <label for="lastname" class="control-label col-lg-2">Lastname  *</label>
                                <div class="col-lg-10">
                                    <input class=" form-control" id="lastname" name="lastname" type="text" />
                                </div>
                            </div>
                            <div class="form-group ">
                                <label for="username" class="control-label col-lg-2">Username *</label>
                                <div class="col-lg-10">
                                    <input class="form-control " id="username" name="username" type="text" />
                                </div>
                            </div>
                            <div class="form-group ">
                                <label for="password" class="control-label col-lg-2">Password *</label>
                                <div class="col-lg-10">
                                    <input class="form-control " id="password" name="password" type="password" />
                                </div>
                            </div>
                            <div class="form-group ">
                                <label for="confirm_password" class="control-label col-lg-2">Confirm Password *</label>
                                <div class="col-lg-10">
                                    <input class="form-control " id="confirm_password" name="confirm_password" type="password" />
                                </div>
                            </div>
                            <div class="form-group ">
                                <label for="email" class="control-label col-lg-2">Email *</label>
                                <div class="col-lg-10">
                                    <input class="form-control " id="email" name="email" type="email" />
                                </div>
                            </div>
                            <div class="form-group ">
                                <label for="agree" class="control-label m-t-less-6 col-lg-2 col-sm-3">Agree to Our Policy *</label>
                                <div class="col-lg-10 col-sm-9 chk-fv">
                                    <input type="checkbox" style="width: 20px" class="checkbox form-control iCheck" id="agree" name="agree" />
                                </div>
                            </div>
                            <div class="form-group ">
                                <label for="newsletter" class="control-label m-t-less-6 col-lg-2 col-sm-3">Receive the Newsletter</label>
                                <div class="col-lg-10 col-sm-9 chk-fv">
                                    <input type="checkbox" style="width: 20px" class="checkbox form-control iCheck" id="newsletter" name="newsletter" />
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-lg-offset-2 col-lg-10">
                                    <button class="btn btn-success" type="submit">Save</button>
                                    <button class="btn btn-default" type="button">Cancel</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </section>
        </div>
    </div>

</div>
<!--body wrapper end-->

